<route lang="json5" type="page">
	{
	layout: 'default',
	style: {
	navigationBarTitleText: '',
	navigationStyle: 'custom',
	disableScroll: true, // 微信禁止页面滚动
	'app-plus': {
	bounce: 'none', // 禁用 iOS 弹性效果
	},
	},
	}
</route>

<template>
	<PageLayout :navbarShow="false">
		<view class="wrap"> <wd-navbar title="商会活动" left-text="返回" left-arrow @click-left="handleClickLeft"
				safeAreaInsetTop></wd-navbar></view>
		<view>
			<button class="save-btn" @click="goAddActive">
				<text>添加活动</text>
			</button>
		</view>
		<ActiveList></ActiveList>
	</PageLayout>
</template>

<script lang="ts" setup>
	import { ref } from 'vue'
	import ActiveList from '@/pages/activitymanage/components/activeList.vue'
	import { useRouter } from '@/plugin/uni-mini-router'
	import { useParamsStore } from '@/store/page-params'

	defineOptions({
		name: 'activity',
		options: {
			// apply-shared‌：当前页面样式会影响到子组件样式.(小程序)
			// shared‌：当前页面样式影响到子组件，子组件样式也会影响到当前页面.(小程序)
			styleIsolation: '‌shared‌',
		},
	})

	const paramsStore = useParamsStore()
	const router = useRouter()
	const handleGo = () => {
		paramsStore.setPageParams('flowIndex', {
			backRouteName: 'activity',
		})
		router.push({ name: 'flowIndex' })
	}

	const routeParams = ref({})
	onLoad((options) => {
		routeParams.value = options
	})

	const handleClickLeft = () => {
		uni.navigateBack()
	}
	const goAddActive = () => {
		uni.navigateTo({
			url: '/pages/activity/addActive'
		})
	}
</script>

<style lang="scss" scoped>
	.wrap {
		height: 100%;
	}

	:deep(.wd-navbar) {
		background: linear-gradient(45deg, #0081ff, #1cbbb4);
		height: 50px;
	}

	.ActiveList {
		height: 600px;
		border: 1px solid red;
	}
</style>